﻿using InnoWeb.CEND.Data.Mapping.BaseMapping;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace InnoWeb.CEND.Data.Mapping.User
{
    using InnoWeb.CEND.Core.Model;

    public class UserMapping : BaseMappingConfiguration<Core.Model.User.User, int>
    {
        public UserMapping()
        {
            this.Property(a => a.Id).HasDatabaseGeneratedOption(System.ComponentModel.DataAnnotations.Schema.DatabaseGeneratedOption.Identity);
            this.Property(a => a.DisplayName).IsRequired().HasMaxLength(90);
            this.Property(a => a.Email).IsRequired().HasMaxLength(90);
            this.Property(a => a.Password).IsRequired().HasMaxLength(20);
            this.Property(a => a.UserName).IsRequired().HasMaxLength(30);
        }
    }
}
